package ai.people.core.security.extractor;

import org.springframework.core.annotation.Order;
import org.springframework.security.oauth2.provider.authentication.BearerTokenExtractor;

import javax.servlet.http.HttpServletRequest;

/**
 * Header提取器
 *
 * @author yuanqinglong
 * @date 2022/7/11 13:03
 */
@Order(2)
public class HeaderAuthorizationValueExtractor extends BearerTokenExtractor implements TokenValueExtractor {


    /**
     * 提取令牌
     *
     * @param request 请求
     * @return {@link String}
     */
    @Override
    public String extractToken(HttpServletRequest request) {
        return this.extractHeaderToken(request);
    }

}
